<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>中玩棋牌 | 登录</title>
    <link rel="stylesheet" href="/backend/bootstrap/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="/backend/plugins/font-awesome/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="/backend/plugins/ionicons/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="/backend/dist/css/AdminLTE.min.css">
</head>
<body class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <p><b>中玩棋牌管理系统</b></p>
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">
        <p class="login-box-msg">请填写您的登录信息</p>
        <form action="{{URL::action('AdminController@postlogin')}}" method="post">
            {{csrf_field()}}
            <div class="form-group has-feedback">
                <input type="text" class="form-control" placeholder="请填写登录账号" name="username"
                       value="{{old('username')}}">
                @if($errors->has('username'))
                    <span class="help-block">
                        <strong class="text-danger">{{$errors->first('username')}}</strong>
                    </span>
                @endif
            </div>
            <div class="form-group has-feedback">
                <input type="password" class="form-control" placeholder="请填写登录密码" name="password">
                @if($errors->has('password'))
                    <span class="help-block">
                        <strong class="text-danger">{{$errors->first('password')}}</strong>
                    </span>
                @endif
            </div>
            <div class="row">
                <div class="col-md-7">
                    <input type="text" class="form-control" placeholder="请填写验证码" name="captcha">
                    @if($errors->has('captcha'))
                        <span class="help-block">
                            <strong class="text-danger">{{$errors->first('captcha')}}</strong>
                        </span>
                    @endif
                </div>
                <!-- /.col -->
                <div>
                    <img id="captchaImg" src="/common/getcaptcha" style="width: 130px;height: 34px;cursor:pointer;"
                         onclick="flushCaptcha();"/>
                </div>
                <!-- /.col -->
            </div>
            <div class="social-auth-links text-center">
                <button type="submit" class="btn btn-primary btn-block">登录</button>
            </div>
        </form>
    </div>
    <!-- /.login-box-body -->
</div>
<!-- /.login-box -->

<!-- jQuery 2.2.3 -->
<script src="/backend/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!-- jQuery UI 1.11.4 -->
<script src="/backend/plugins/jQueryUI/jquery-ui.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/backend/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
    $(function () {
        flushCaptcha();
    });

    function flushCaptcha() {
        $('#captchaImg').attr('src', '/common/getcaptcha?r=' + Math.random());
    }
</script>
</body>
</html>
